#ifndef FUNCTION_H_  
#define FUNCTION_H_  
  
#include<iostream>   
#include<cmath>  
#include"polynomial.h"  
#include<string>
#include<fstream>
  
class Function  
{    
public:  
    virtual double f(double x) const = 0;  
    virtual double df(double x) const = 0;  
    virtual double d2f(double x) const = 0;
    void print_sample_pt(double a, double b, int num, string &name);
};  
  
class ProblemA: public Function  
{    
public:    
    double f(double x) const override;    
    double df(double x) const override;    
    double d2f(double x) const override;  
};   
  
class ProblemC: public Function  
{    
public:    
    double f(double x) const override;    
    double df(double x) const override;    
    double d2f(double x) const override;  
};   
  
#endif  